<script setup>
import { ref, onMounted, watch } from 'vue'
import { RouterView } from 'vue-router'
import HeaderView from './components/HeaderView.vue'
import FooterView from './components/FooterView.vue'
import { useRouter } from 'vue-router';

const route = useRouter()
const router = route.currentRoute.value;
const fullPath = ref(null)

onMounted(() => {
  // console.log(fullPath.value)
  // fullPath.value = router.fullPath
  // alert(router.fullPath)
  // const mq = window.matchMedia('(prefers-color-scheme: dark)');
  // if (localStorage.getItem("theme") == 'dark' || mq) {
  //   document.body.classList.toggle('dark-scheme');
  // } else {
  //   document.body.classList.toggle('light-scheme');
  // }
})





</script>

<template>
  <HeaderView />
  <!-- <RouterView /> -->
  <RouterView v-slot="{ Component }" :key="$route.fullPath">
    <keep-alive>
      <component v-if="router.meta.keepAlive" :is="Component" />
    </keep-alive>
    <component v-if="!router.meta.keepAlive" :is="Component" />
  </RouterView>
  <FooterView />
</template>

<style lang="less" >
.el-table--fit .el-table__inner-wrapper:before {
  display: none;
}

// @media (min-width: 1024px) {}
.t_hash {
  display: flex;
  align-items: center;
  padding: 5px 0;

  .txs_i {
    width: 22px;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    height: 22px;
    color: rgba(34, 114, 255, 0.8);
    background: #E9F1FF;
    border: 1px solid rgba(34, 114, 255, 0.1);
    font-size: 0.8rem;
  }
}

table thead tr th .cell {
  color: var(--color-text) !important;
  font-family: var(--font-bold) !important;

  .mp_flex {
    font-weight: bold !important;
  }
}

.el-table {
  color: var(--color-text);
}

.table tr td .reds.el-icon {
  color: #ff5656;
  font-size: 1.3rem;
  width: 14px;
  margin: 0;
  margin-right: .3rem;
}

.t_hash_r {
  display: flex;
  gap: 5px
}

.el_que {
  background: #aaa;
  border-radius: 50%;
}

.t_hash_eye {
  display: flex;

  p {
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #E5E5EA;
    box-sizing: content-box;
    padding: 1px;
    cursor: pointer;
    transition: .5s;
    margin-right: 10px;

    &:hover {
      background: rgb(223, 230, 230);
    }

    img {
      width: 20px;
      height: auto;
    }
  }
}

.small_p {
  font-size: 0.8rem !important;
  color: var(--color-text2) !important;
}

.i-address {
  // background: rgba(0, 201, 167, 0.2);
  // // color: #029777;
  color: rgba(34, 114, 255, 0.8);
  background: #E9F1FF;
  border: 1px solid rgba(34, 114, 255, 0.1);
  padding: 0 5px;
  border-radius: 4px;
  line-height: 18px;
  font-size: 0.75rem;
}

.i-out {
  color: rgb(239, 180, 5);
  background: #fff9e6;
  border: 1px solid #cc9a0646;
}

.overview_tit {
  span {
    color: #000;
    background: #e5e5ea;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.8rem;
    display: inline-block;
    margin: 15px 10px 15px 0;
    cursor: pointer;
    transition: .5s;
  }

  span.ups,
  span:hover {
    color: #fff;
    background: rgba(34, 114, 255, 1);
  }
}

.bolck_table {
  .copy_box .icon_tx {
    color: var(--color-text);
    max-width: inherit;
  }

  h4 {
    line-height: 44px;
    border-bottom: 1px solid #e7eaf3;
    font-weight: bold;

    span {
      border-bottom: 2px solid #3498db;
      color: #3498db;
      display: inline-block;
      padding: 0 15px;
    }
  }

  .name_p {
    span {
      color: var(--color-text2);
    }
  }

  .que {
    width: 16px;
    margin-bottom: 2px;
  }

  ul li {
    margin: 0 0px;
    padding: 8px 0;
    // border-bottom: 1px solid #e7eaf3;
    font-size: 0.9rem;



    .el-icon-warning-outline {
      color: #ccc;
      padding-right: 2px;
    }

    &:last-child {
      border: 0;
    }

    .v_block {
      display: flex;
      align-items: center;

      .el-icon {
        font-size: 0.7rem;
      }

      .fbold {
        padding-right: 10px;
      }

      span {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        background: var(--vt-c-text-dark-2);
        cursor: pointer;
        margin-left: 5px;
        text-align: center;
        line-height: 2rem;
        border-radius: .2rem;
        transition: 0.5s;

        &:hover {
          background: #ccc;
        }
      }
    }

    p {
      word-break: break-all;
      word-wrap: break-word;
      display: flex;
      align-items: center;
      gap: 5px;
    }
  }
}

.tx_status {
  display: inline-flex;
  align-items: center;
  line-height: 24px;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--primary-color);
  border-radius: 4px;
  padding: 1px 6px;
  background: #ccc;

  p {
    line-height: 20px;
    font-size: 0.7rem;
  }
}

.tx_error {
  background: rgba(255, 93, 34, 0.10);
  border: 1px solid rgba(255, 93, 34, 0.30);
  color: #ff4343
}

.tx_success {
  background: rgba(34, 114, 255, 0.10);
  border: 1px solid rgba(34, 114, 255, 0.30);
}

.tx_Block {
  display: flex;
  align-items: center;
  gap: 2px;
  line-height: 1.2rem;

  a {
    letter-spacing: 2px;
    font-size: 1rem;
  }

  span {
    font-size: 0.66rem;
    border-radius: 4px;
    padding: 2px 6px;
    background: rgba(242, 242, 247, 1);
    border: 1px solid rgba(229, 229, 234, 1);
    margin-left: 8px;
  }
}

.p_samll {
  font-size: 0.75rem;
}

.tx_to {

  margin-top: 4px;

  i {
    color: var(--color-text2);
  }

}

.plugin {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;

  button {
    font-size: 0.8rem;
    background: #fff;
    border: 1px solid #e9ecef;
    padding: 6px 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: .5s;

    span {
      letter-spacing: 0;
    }

    &:hover {
      background: #F8F9FA;
    }
  }

}

@media (max-width:1000px) {
  .tit_box {
    flex-direction: column;
    align-items: flex-start !important;

    .select_box {
      width: 100% !important;
    }

    h3 {
      padding-bottom: 5px;
      font-size: 0.9rem !important;
    }
  }

  .t_info {
    margin-bottom: 15px !important;

    dl {
      padding: 10px !important;
      margin-bottom: 3px !important;

      dd {
        font-size: 16px !important;
      }
    }
  }

  .info_container .card {
    h3 {
      font-size: 0.85rem;
    }

    p {
      min-height: 30px;
      line-height: 30px !important;
      height: auto !important;
      font-size: 0.8rem;

      i {
        font-size: 0.8rem !important;
      }
    }
  }

  .add_tabs ul li span {
    padding: 5px !important;
    font-size: 0.75rem !important;
  }

  .bolck_table ul li {
    font-size: 0.8rem !important;
  }

}
</style>
